package com.dlc.shop.systemtest.api.amount;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.dlc.shop.bean.model.Sku;
import com.dlc.shop.systemtest.constants.Constant;
import com.dlc.shop.systemtest.util.HttpUtil;

import java.util.List;

/**
 * @author lanhai
 */
public class SkuApi {
    public static List<Sku>  getAllSkuList(Long prodId){
        String url = Constant.SHOP_URL + "/sku/getAllSkuList?prodId="+prodId;
        List list = HttpUtil.get(url, List.class);
        List<Sku> skuList = JSON.parseArray(JSONObject.toJSONString(list), Sku.class);
        return  skuList;
    }
}
